﻿//
// Created: 2018/8/1
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Model.Util;

namespace Model.Util.Map
{
    internal  class IdentityMap:EntityTypeConfiguration< Identity >    
    {
        public IdentityMap()
        {
             this.ToTable("Identity");
             this.HasKey(i => new { i.ID });
             this.Property(i => i.ID).HasColumnName("ID");                     
             this.Property(i => i.ProjectID).HasColumnName("ProjectID");                     
             this.Property(i => i.CreateTime).HasColumnName("CreateTime");
            this.Property(i => i.Guid).HasColumnName("Guid");
            
        }   
    }
    
     public static class IdentityMapExtensions
    {
        public static void UserIdentityMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new IdentityMap());
        }
    }
}